import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}

export function userList() {
  return request({
    url: '/user/list',
    method: 'get'
  })
}
//修改密码
export function changePwd(data){
  return request({
    url: '/user/password',
    method: 'post',
    data
  })
}

//新增用户
export function userAdd(data){
  return request({
    url:'/user/add',
    method:'post',
    data
  })
}

//删除用户
export function userDelete(data){
  return request({
    url:'/user/delete',
    method:'post',
    data
  })
}

//编辑用户
export function userEdit(data){
  return request({
    url:'/user/edit',
    method:'post',
    data
  })
}

//查询用户
export function userSelect(data){
  return request({
    url:'/user/select',
    method:'post',
    data
  })
}